/{businessId}/troubleTicket
[POST]
This usecase to create ticket in salesforce from Zabbix
URL
https://nonprod.esb.cloud.lla.com/test/monitoring-tools-ux/monitoring-tools-ux/v1/{businessId}/troubleTicket
URL Param
| name | type | description | required | 
|---|
| businessId | string | Allowed value for thsi scope: CW, BO, SA, SE, SX, MF, CO, HN, CR, DO, SV, GT | Y | 
| name | type | description | required | 
|---|
| client_id | string | The client_id identifying the  channel. Minimum characters: 5 | Y | 
| client_secret | string | Password associated with the client_id. Minimum characters: 5 | Y | 
| X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. Note - Mule default behavior creates a sample x-correlation-id field if value is not passed from client, API will use this value in case value is not passed in API request syntax: correlationId: uuid:cwc--, example: correlationId: f058ebd6-02f7-4d3f-942e-904344e8cde5:cwc--qacarepc | Y | 
Salesforce tenants
| SF Environment to Connect | SF Instance | 
|---|
| QA | cwc--qacarepc | 
| UAT | cwc--uatsfdc | 
| Production | cwc--prod | 
Field Mapping
| name | type | description | required | 
|---|
| @type | string | Default: TroubleTicket | Y | 
| name | string | Name of the incident | Y | 
| description | string | Description of incident | Y | 
| ticketType | string | Type of incident, Pass RecordType for Incident and Case  Default:incident-case | Y | 
| externalId | string | Pass RecordTypeId of Incident and case in Salesforce Ex: 01280000000AqtFAAS-01234000000GI2LAAW | Y | 
| priority | string | Priority of incident. Allowed Values:Critical, High, Medium, Low, Planning | Y | 
| severity | string | Severity of incident. Allowed Values: Critical, High, Medium, Low, Planning | Y | 
| status | string | Status of Ticket, Allowed Values: acknowledged,held,inProgress,pending,resolved,closed,cancelled | Y | 
| channel.id | string | Default: For Zabbix -> Zabbix, ToolMaster -> ToolMaster | Y | 
| channel.name | string | Default: For Zabbix -> Zabbix, ToolMaster -> ToolMaster | Y | 
| channel.@type | string | Default: ChannelRef | Y | 
| note[].text | string | Value should be in format - | Y | 
| note[].@type | string | Default: Note | Y | 
| relatedParty[].id | string | Salesforce ObjectID of Account | Y | 
| relatedParty[].name | string | Salesforce ObjectID of Contact | Y | 
| relatedParty[].role | string | Default: User | Y | 
| relatedEntity[].id | string | Defalut: 'sf' | Y | 
| relatedEntity[].role | string | Default: MonitoringTicket | Y | 
| relatedEntity[].name | string | Default: InstalledSoftware | Y | 
| relatedEntity[].@referredType | string | Default: LogicalResource | Y | 
| relatedEntity[].id | string | Salesforce ObjectId of Asset, please repeat the object based on assets | Y | 
| relatedEntity[].role | string | Default: MonitoringTicket | Y | 
| relatedEntity[].name | string | Default: AssetId | Y | 
| relatedEntity[].@referredType | string | Default: TroubleTicket | Y | 
| troubleTicketCharacteristic[].name | string | name of the characteristic | Y | 
| troubleTicketCharacteristic[].value | string | value of characteristic | Y | 
| troubleTicketRelationship[].id | string | Case Id | Y | 
| troubleTicketRelationship[].name | string | Case Name | Y | 
| troubleTicketRelationship[].@type | string | Default: TroubleTicketRelationship | Y | 
Characteristics Name
| characteristic name | type | description | required | 
|---|
| AffectedDate | string | The "affected date" specifies when the issue that caused the incident actually happened | N | 
| Attributed | string | AvalableValues-C&W, C&W Human Error, C&W Implementation, C&W Inside Plant, C&W Maintenance Window, C&W Outside Plant, Carrier, Customer, Force Majeure, Provider, Tier 1 Support, Tier 2 Support, Tier 3 Support | N | 
| caseReason | number | The reason for which case was created. Available Values- Service Alarmed, Service Down, Intermittencies and/or Latencies, Other | Y | 
| cause | string | Issue of the Ticket "Router issue" | N | 
| FailureLocation | string | Place or reason where failure occured AvailableValues-Customer Premises, Datacenter, External Provider, International Trunk, Last Mile, National Trunk, Node(Core) | N | 
| Symptom | string | Behaviour or alerets on the device. For Example: All lights are green colour, Blinking | N | 
| TypeOfAction | string | This describes Proactive or Reactive. Availablevalues-Proactive or Reactive | Y | 
| Catagory | string | Type of incident Category. Security Policy - Access NOT Authorized,Abuse - General, Abuse - Copyright, Abuse - Spam, Abuse - Dos and DDoS Attacks, Abuse - Bruteforce Attacks | N | 
| FailureClass | string | This is the classifications of various reasons for failures caused in the Incident. Salesforce ObjectID "0ny79000000KyqlAAC" | N | 
| FailureCode | string | This is the classification code of various reasons for failures caused in the Incident Salesforce ObjectID "0ab56000000KyqlBRC" | N | 
| OwnerId | string | Salesforce Object Id of User, Group. These ids will be retrieved by Toolmaster from Salesforce using Analytics query and send it to ESB while creating trouble ticket "0qc73000000KyqlFFH" | N | 
| vendor | string | Vendor of the Asset example: Huawei | N | 
| DownTimeStartDateAndTime | string | This describes start of down time | N | 
| DownTimeEndDateAndTime | string | This describes end of down time | N | 
| isSecurityIncident | string | Boolean value (true/false) | N | 
| isMajorIncident | string | Boolean value (true/false) | Y | 
ExternalId Values based on SF instance
| Salesforce Environment | Incident RecordTypeId | Case RecordTypeId | Example of “externalId” field value | 
|---|
| QA | 0124X000001hi9aQAA | 0124X000001hi9WQAQ | “externalId”:” 0124X000001hi9aQAA-0124X000001hi9WQAQ” | 
| UAT | 0127d0000005qIGAAY | 0127d0000005qICAAY” | “externalId”:” 0127d0000005qIGAAY-0127d0000005qICAAY” | 
| Production | 0124X000001hi9aQAA | 0124X000001hi9WQAQ” | “externalId”:” 0124X000001hi9aQAA-0124X000001hi9WQAQ” | 
Sample request
{
    "description": "Ticket Description",
    "ticketType": "incident-case",
    "externalId": "01280000000AqtFAAS-01234000000GI2LAAW",
    "name": "Test Caribbean Countries Account",
    "priority": "High",
    "severity": "Major",
    "status": "closed",
    "channel": {
        "id": "Zabbix",
        "name": "Zabbix",
        "@type": "ChannelRef"
    },
    "note": [
        {
            "text": "This is quite important, please approach me as soon as possible",
            "@type": "Note"
        }
    ],
    "relatedParty": [
        {
            "id": "0tA8B0000004Nsd", 
            "name": "0tA8B0000004ab",
            "role": "User"
        }
    ],
    "relatedEntity": [
        {
            "id": "sf",
            "role": "MonitoringTicket",
            "name": "InstalledSoftware" ,
            "@referredType": "LogicalResource"
        },
        {
            "id": "0tA8B0000004NgGUAU", 
            "role": "MonitoringTicket",
            "name":"AssetId",
            "@referredType": "TroubleTicket"
        },
        {
            "id": "0y4B0000007NgHGDGH",
            "role": "MonitoringTicket",
            "name":"AssetId",
            "@referredType": "TroubleTicket"
        }
    ],
    "troubleTicketCharacteristic": [
        {
            "name": "AffectedDate",
            "value": "2024-01-24T18:00:58.000+0000"
        },
        {
            "name": "Attributed",
            "value": "C&W Outside Plant"
        },
        {
            "name": "caseReason",
            "value": "Service Down"
        },
        {
            "name": "cause",
            "value": "router issue"
        },
        {
            "name": "FailureLocation",
            "value": "Datacenter"
        },
        {
            "name": "Symptom",
            "value": "Blinking"
        },
        {
            "name": "TypeOfAction",
            "value": "Proactive"
        },
        {
            "name": "Catagory",
            "value": "Security Policy - Access NOT Authorized"
        },
        {
            "name": "FailureClass",
            "value": "0ny79000000KyqlAAC"
        },
        {
            "name": "FailureCode",
            "value": "0ny79000000KyqlAAC"
        },
        {
            "name": "OwnerId",
            "value": "0ny79000000KyqlAAC"
        },
        {
            "name": "vendor",
            "value": "HUAWEI"
        },
        {
            "name": "DownTimeStartDateAndTime",
            "value": "2024-01-24T16:00:58.000+0000"
        },
        {
            "name": "DownTimeEndDateAndTime",
            "value": "2024-01-24T18:00:58.000+0000"
        },
        {
            "name": "isSecurityIncident",
            "value": "false"
        },
        {
            "name": "isMajorIncident",
            "value": "false"
        }
    ],
    "troubleTicketRelationship": [
        {
            "id": "ny79000000KyqlAAC",
            "name": "SCCD",
            "@type": "TroubleTicketRelationship"
        }
    ],
    "@type": "TroubleTicket"
}
##### Sample response
```json
{
    "id": "INC-000000070", 
    "externalId": "0ny05000000L8ZoAAK",
    "troubleTicketCharacteristic" : [
    {
      "name":"isMajorIncident",
      "value":" false
    }
    ]
}